// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'babel-polyfill';
import promise from "es6-promise"
promise.polyfill()
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import store from "@/store"
import moment from "moment"
Vue.use(ElementUI);
Vue.config.productionTip = false

// 定义一个全局过滤器实现日期格式化
Vue.filter('timeFormat', (value, format)=> {
  if(!value) return value;
  format = format || "YYYY-MM-DD HH:mm:ss"
  return moment(value).format(format)
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  store,
  router,
  components: { App },
  template: '<App/>'
})
